package com.aptech.daos;

/**
 * AbstractOrderDetailsId entity provides the base persistence definition of the
 * OrderDetailsId entity. @author MyEclipse Persistence Tools
 */

public abstract class AbstractOrderDetailsId implements java.io.Serializable {

	// Fields

	private Orders orders;
	private Products products;

	// Constructors

	/** default constructor */
	public AbstractOrderDetailsId() {
	}

	/** full constructor */
	public AbstractOrderDetailsId(Orders orders, Products products) {
		this.orders = orders;
		this.products = products;
	}

	// Property accessors

	public Orders getOrders() {
		return this.orders;
	}

	public void setOrders(Orders orders) {
		this.orders = orders;
	}

	public Products getProducts() {
		return this.products;
	}

	public void setProducts(Products products) {
		this.products = products;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractOrderDetailsId))
			return false;
		AbstractOrderDetailsId castOther = (AbstractOrderDetailsId) other;

		return ((this.getOrders() == castOther.getOrders()) || (this
				.getOrders() != null && castOther.getOrders() != null && this
				.getOrders().equals(castOther.getOrders())))
				&& ((this.getProducts() == castOther.getProducts()) || (this
						.getProducts() != null
						&& castOther.getProducts() != null && this
						.getProducts().equals(castOther.getProducts())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getOrders() == null ? 0 : this.getOrders().hashCode());
		result = 37 * result
				+ (getProducts() == null ? 0 : this.getProducts().hashCode());
		return result;
	}

}